<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1.0" />
    <title>社聚共享后台管理系统</title>
    <#include "/view/admin/head.html"/>
    <script src="${base}/jstool/metismenu.js"></script>
    <!--<script src="${base}/jstool/prism/prism.min.js"></script>-->

    <link rel="stylesheet" type="text/css" href="${base}/jstool/metismenu.min.css" />
    <link rel="stylesheet" type="text/css" href="${base}/jstool/demo.css" />

    <script>
        $(function () {

            //调用方法
            $('#menu').metisMenu();

            $('.sidebar a').each(function(){
                var href = $(this).attr('href');
                if('#'!=href){
                    $(this).attr('target','mainFrame');
                }


            });
            $('.sidebar a').click(function(){
                var href = $(this).attr('href');
                if('#'!=href){
                    var mainFrame = $(window.frames.mainFrame);
//                    var mainFrame = parent.document.getElementById("mainFrame");
                    console.log(mainFrame);
                    console.log(href);
                    mainFrame.src = href;
//                    $(this).attr('target','mainFrame');
                }
            });
            $('.active li a')[0].click();
//            function test(){
//                var frameid = parent.document.getElementById("rightFrame");
//                frameid.src = "right.html";
//            }
        });
    </script>
</head>
<body>
<aside class="sidebar">

    <nav class="sidebar-nav">
        <ul id="menu">
          <!--  <li class="top-menu-li">
                <a href="javascript:void(0)" style="display: block;"><span class="glyphicon glyphicon-list"></span></a>
            </li>-->


                    <#list listmap as maplist>
                        <#if maplist_index==0>
                            <li class="active">
                            <#else>  <li>
                        </#if>

                            <a href="#">${maplist.title} <span class="glyphicon arrow"></span></a>
                            <#list maplist.list as c>
                                <ul class="collapse">
                                    <li><a href="${base}${c.url}">${c.title}</a></li>
                                </ul>
                            </#list>
                        </li>
                    </#list>


                </ul>


    </nav>

</aside>
</body>
</html>